//
//  WSJSportDataRecordHeaderView.m
//  RunningMan
//
//  Created by dllo on 16/5/23.
//  Copyright © 2016年 WSJ. All rights reserved.
//

#import "WSJSportDataRecordHeaderView.h"
#define W self.frame.size.width
#define H self.frame.size.height

@implementation WSJSportDataRecordHeaderView

-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithReuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self creatView];
    }
    return self;
}

-(void)creatView{
    
    self.dataLabel = [[UILabel alloc] init];
    self.dataLabel.text = @"日期";
    self.dataLabel.textAlignment = 1;
    self.dataLabel.textColor = [UIColor lightGrayColor];
    self.dataLabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.dataLabel];
    
    
    self.distanceLabel = [[UILabel alloc] init];
    self.distanceLabel.text = @"总公里数";
    self.distanceLabel.textAlignment = 1;
    self.distanceLabel.textColor = [UIColor lightGrayColor];
    self.distanceLabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.distanceLabel];
    
    
    self.timeLabel = [[UILabel alloc] init];
    self.timeLabel.text = @"总用时";
    self.timeLabel.textAlignment = 1;
    self.timeLabel.textColor = [UIColor lightGrayColor];
    self.timeLabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.timeLabel];
    
    self.caloriesLabel = [[UILabel alloc] init];
    self.caloriesLabel.text = @"总卡路里";
    self.caloriesLabel.textAlignment = 1;
    self.caloriesLabel.textColor = [UIColor lightGrayColor];
    self.caloriesLabel.font = [UIFont systemFontOfSize:20];
    [self.contentView addSubview:self.caloriesLabel];
    
    
}

-(void)layoutSubviews{
    [super layoutSubviews];
    
    self.dataLabel.frame = CGRectMake(0, 0, W / 4, H);
    self.distanceLabel.frame = CGRectMake(W / 4, 0, W / 4, H);
    self.timeLabel.frame = CGRectMake(W / 4 * 2, 0, W / 4, H);
     self.caloriesLabel.frame = CGRectMake(W / 4 * 3, 0, W / 4, H);
    
    
}

@end
